home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 7 / Amiga Format AFCD07 (Dec 1996, Issue 91).iso / serious / shareware / programming / aros / dos / unloadseg.c < prev    next >
Encoding:
C/C++ Source or Header  |  1996-09-12  |  1.3 KB  |  71 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: unloadseg.c,v 1.3 1996/08/13 13:52:52 digulla Exp $
  4.     $Log: unloadseg.c,v $
  5.     Revision 1.3  1996/08/13 13:52:52  digulla
  6.     Replaced <dos/dosextens.h> by "dos_intern.h" or added "dos_intern.h"
  7.     Replaced __AROS_LA by __AROS_LHA
  8.  
  9.     Revision 1.2  1996/08/01 17:40:59  digulla
  10.     Added standard header for all files
  11.  
  12.     Desc:
  13.     Lang: english
  14. */
  15. #include <clib/exec_protos.h>
  16. #include <dos/dos.h>
  17. #include "dos_intern.h"
  18.  
  19. /*****************************************************************************
  20.  
  21.     NAME */
  22.     #include <clib/dos_protos.h>
  23.  
  24.     __AROS_LH1(void, UnLoadSeg,
  25.  
  26. /*  SYNOPSIS */
  27.     __AROS_LHA(BPTR, seglist, D1),
  28.  
  29. /*  LOCATION */
  30.     struct DosLibrary *, DOSBase, 26, Dos)
  31.  
  32. /*  FUNCTION
  33.     Free a segment list allocated with LoadSeg().
  34.  
  35.     INPUTS
  36.     seglist - The segment list.
  37.  
  38.     RESULT
  39.  
  40.     NOTES
  41.  
  42.     EXAMPLE
  43.  
  44.     BUGS
  45.  
  46.     SEE ALSO
  47.     LoadSeg()
  48.  
  49.     INTERNALS
  50.  
  51.     HISTORY
  52.     29-10-95    digulla automatically created from
  53.                 dos_lib.fd and clib/dos_protos.h
  54.  
  55. *****************************************************************************/
  56. {
  57.     __AROS_FUNC_INIT
  58.     __AROS_BASE_EXT_DECL(struct DosLibrary *,DOSBase)
  59.  
  60.     BPTR next;
  61.  
  62.     while(seglist)
  63.     {
  64.     next=*(BPTR *)BADDR(seglist);
  65.     FreeVec(BADDR(seglist));
  66.     seglist=next;
  67.     }
  68.  
  69.     __AROS_FUNC_EXIT
  70. } /* UnLoadSeg */
  71.